package com.young.test.domain;

import org.apache.log4j.Logger;

public class Person {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = Logger.getLogger(Person.class);
	
	private String name;
	private Person spouse;
	
	public Person(){}
	
	public Person(String name,int age){
		this.name = name;
		this.age = age;
	}
	
	public Person getSpouse() {
		return spouse;
	}
	public void setSpouse(Person spouse) {
		this.spouse = spouse;
	}
	private int age;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	
	public void info(){
		logger.info("My name is "+name);
		logger.info("My age is "+age);
		logger.info("My spouse is "+spouse.getName());
	}
	
	public void execute(){
		info();
	}

}
